package com.baizhi.springboot.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Book {
    /*`id` int(11) NOT NULL AUTO_INCREMENT,
  `user` varchar(255) DEFAULT NULL,
  `department` varchar(255) DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `book_id` varchar(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `approver` varchar(255) DEFAULT NULL,*/
    private Integer id;
    private String user;
    private String department;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;
    private String book_id;
    private String name;
    private String approver;

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", user='" + user + '\'' +
                ", department='" + department + '\'' +
                ", date=" + date +
                ", book_id='" + book_id + '\'' +
                ", name='" + name + '\'' +
                ", approver='" + approver + '\'' +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getBook_id() {
        return book_id;
    }

    public void setBook_id(String book_id) {
        this.book_id = book_id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getApprover() {
        return approver;
    }

    public void setApprover(String approver) {
        this.approver = approver;
    }

    public Book(Integer id, String user, String department, Date date, String book_id, String name, String approver) {
        this.id = id;
        this.user = user;
        this.department = department;
        this.date = date;
        this.book_id = book_id;
        this.name = name;
        this.approver = approver;
    }

    public Book() {
    }
}
